home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 1 #4 / Commodore_Disk_User_Vol.1_4_1988_-.d64 / inside basic (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  4KB  |  153 lines

  1. 10 rem*********************************
  2. 20 rem
  3. 30 rem       inside basic:
  4. 40 rem three routines to illustrate
  5. 50 rem how c64 basic works
  6. 60 rem line 20000: how basic lines are stored
  7. 70 rem line 40000: some important page zero addresses
  8. 80 rem line 60000: variable, array and string dump
  9. 90 rem*********************************
  10. 100 rem
  11. 120 rem
  12. 125 poke 53281,0
  13. 130 rem menu
  14. 140 print "[147]":print:print tab(10);"inside basic":print:print
  15. 150 print tab(6);"1.  basic line addresses":print:print
  16. 160 print tab(6);"[159]2.  program statistics":print:print
  17. 170 print tab(6);"[158]3.  basic memory dump":print:print
  18. 180 print tab(10);"enter option no(1-3)
  19. 190 [161] i$:[139] i$[178]"" [167] 190
  20. 200 [139] i$[179]"1" [176] i$[177]"3" [167] 190
  21. 205 [153] "load":[153]
  22. 210 [145] [197](i$) [141] 20000,40000,1000
  23. 220 [153]:[153] "press any key to return to menu"
  24. 230 [161] i$:[139] i$[178]"" [167] 230
  25. 240 [156]:[137] 140
  26. 243 [143]
  27. 245 [143] test routine for s/r 60000
  28. 247 [143]
  29. 1000 [134] a$(5),b$(2,2),c$(1,1,1),i%(9),a(9)
  30. 1010 d$[178]"a string":i%[178]32000:r[178]1.9e15
  31. 1020 [129] n[178]0 [164] 9:i%(n)[178]n:a(n)[178]n:[130]
  32. 1030 [129] n[178]0 [164] 5:[135] a$(n):[130]
  33. 1040 [129] m[178]0 [164] 2:[129] n[178]0 [164] 2:[135] b$(n,m):[130]:[130]
  34. 1050 [129] q[178]0 [164] 1:[129] m[178]0 [164] 1:[129] n[178]0 [164] 1:[135] c$(n,m,q):[130]:[130]:[130]
  35. 1800 [131] this,is,a,one,dimensional,array
  36. 1810 [131] this,is,a,two,dimensional,array,"","",""
  37. 1820 [131] this,is,a,three,dimensional,array,"",""
  38. 1900 [141] 60000:[142]
  39. 19000 [143]
  40. 19010 [143] how basic lines are stored
  41. 19020 [143]
  42. 20000 address[178][194](43)[170][194](44)[172]256
  43. 20100 lineno[178][194](address[170]2)[170][194](address[170]3)[172]256
  44. 20110 [153] "line ";lineno;" starts at address ";address
  45. 20120 address[178][194](address)[170][194](address[170]1)[172]256
  46. 20130 [139] [194](address)[179][177]0 [176] [194](address[170]1)[179][177]0 [167] 20100
  47. 20140 [142]
  48. 35000 [143]
  49. 35010 [143] important addresses
  50. 35020 [143]
  51. 40000 txttab[178][194](43)[170][194](44)[172]256
  52. 40020 vartab[178][194](45)[170][194](46)[172]256
  53. 40030 arytab[178][194](47)[170][194](48)[172]256
  54. 40040 srfin[178][194](49)[170][194](50)[172]256
  55. 40050 sstart[178][194](51)[170][194](52)[172]256
  56. 40060 memsiz[178][194](55)[170][194](56)[172]256
  57. 40070 psize[178]vartab[171]txttab
  58. 40080 vsize[178]arytab[171]vartab
  59. 40090 asize[178]srfin[171]arytab
  60. 40100 sizest[178]sstart[170]1[171]srfin
  61. 40110 [153] "start of program:",txttab
  62. 40120 [153] "start of variables:",vartab
  63. 40130 [153] "start of arrays:",arytab
  64. 40140 [153] "end of strings:",sren
  65. 40150 [153] "start of strings:",sstart
  66. 40160 [153]
  67. 40170 [153] "end of basic space:",memsiz
  68. 40180 [153] "program space";psize;" bytes"
  69. 40190 [153] "variable space";vsize;" bytes"
  70. 40200 [153] "array space";asize;" bytes"
  71. 40210 [153] "string space";sizest;" bytes"
  72. 40220 [142]
  73. 59000 [143]
  74. 59100 [143] dump of variables, strings
  75. 59110 [143]      and arrays
  76. 59120 [143]
  77. 60000 xb[178]0:xl[178]0:xa[178]0:xx[178]0:x1[178]0:x2[178]0:xf[178]0:xy[178]0:xz[178]0:xq[178]0:xt[178]0:x$[178]"":xd[178]0:xr[178]0
  78. 60010 x3[178]0:x4[178]0:x5[178]0
  79. 60020 xn[178][194](45)[170][194](46)[172]256:xc[178]xn[171]7
  80. 60030 xe[178][194](47)[170][194](48)[172]256:xf[178][194](49)[170][194](50)[172]256
  81. 60040 xc[178]xc[170]7:[139] ([194](xc)[175]127)[179][177]88 [167] 60040
  82. 60050 [139] ([194](xc[170]1)[175]127)[179][177]66 [167] 60040
  83. 60053 [143]
  84. 60055 [143] loop to do variables
  85. 60057 [143]
  86. 60060 x1[178][194](xn):x2[178][194](xn[170]1)
  87. 60070 [139] (x1[175]127)[178]88 [167] xn[178]xn[170]7:[137]60100
  88. 60080 [141] 60310:[153] ": ";
  89. 60090 [141] 60430:xn[178]xn[170]7
  90. 60100 [139] xn[179]xe[167] 60060
  91. 60110 [153]
  92. 60113 [143]
  93. 60115 [143] start of array loop
  94. 60117 [143]
  95. 60120 [139] xn[178][177]xf [167] 60145
  96. 60130 [153] "array:wait ";:x1[178][194](xn):x2[178][194](xn[170]1):[141] 60310:[141] 60150
  97. 60140 [153]:xn[178]xn[170]2:[137] 60120
  98. 60145 [153]:[153] "sysend of datawait":[142]
  99. 60146 [143]
  100. 60148 [143] print one array(name first)
  101. 60149 [143]
  102. 60150 [153] "(";:xx[178]0:xy[178]0:xz[178]0:xd[178][194](xn[170]4):xq[178]xn[170]5
  103. 60160 [139]xd[177]2[167]xz[178][194](xn[170]10)[170][194](xn[170]9)[172]256[171]1:xq[178]xq[170]2:[153]xz;",";
  104. 60170 [139] xd[177]1[167]xy[178][194](xn[170]8)[170][194](xn[170]7)[172]256[171]1:xq[178]xq[170]2:[153]xy;",";
  105. 60180 xx[178][194](xn[170]6)[170][194](xn[170]5)[172]256[171]1:[153] xx;
  106. 60190 [153] ")":xn[178]xq
  107. 60193 [143]
  108. 60195 [143] nested loop for elements
  109. 60197 [143]
  110. 60200 [129] x3[178]0 [164] xx:[129] x4[178]0 [164] xy:[129] x5[178]0 [164] xz
  111. 60210 [153] x$;"(";
  112. 60220 [139] xd[177]2 [167] [153] x5;",";
  113. 60230 [139] xd[177]1 [167] [153] x4;",";
  114. 60240 [153] x3;"):";
  115. 60250 [141] 60430:[139] xt[178]1 [167] xn[178]xn[170]5:[137] 60280
  116. 60260 [139] xt[178]3 [167] xn[178]xn[170]3:[137] 60280
  117. 60270 xn[178]xn[170]2
  118. 60280 [130] x5:[130] x4:[130] x3
  119. 60290 [142]
  120. 60303 [143]
  121. 60305 [143] print name
  122. 60307 [143]
  123. 60310 x$[178][199](x1[175]127)[170][199](x2[175]127)
  124. 60320 [139] x1[177]127 [167] 60350
  125. 60330 [139] x2[179]128 [167] xt[178]1:[137] 60360
  126. 60340 xt[178]3:x$[178]x$[170]"$":[137] 60360
  127. 60350 xt[178]2:x$[178]x$[170]"%":[137] 60360
  128. 60360 [153] x$;:[142]
  129. 60363 [143]
  130. 60365 [143] print string
  131. 60367 [143]
  132. 60370 xl[178][194](xn[170]2):xa[178][194](xn[170]3)[170]([194](xn[170]4))[172]256:[153] [199](34);
  133. 60380 [139] xa[178]0 [167] 60400
  134. 60390 [129] xr[178]0 [164] xl[171]1:[153] [199]([194](xa[170]xr));:[130] xr
  135. 60400 [153][199](34):[142]
  136. 60403 [143]
  137. 60405 [143] print integer
  138. 60407 [143]
  139. 60410 x1[178][194](xn[170]2):x2[178][194](xn[170]3):[153]x2[170]x1[172]256:[142]
  140. 60413 [143]
  141. 60415 [143] print real
  142. 60417 [143]
  143. 60420 [129] xr[178]2 [164] 6:[151] xc[170]xr,[194](xn[170]xr):[130] xr:[153] xb:[142]
  144. 60423 [143]
  145. 60425 [143] print content
  146. 60427 [143]
  147. 60430 [139] xt[178]2 [167] 60460
  148. 60440 [139] xt[178]1 [167] 60470
  149. 60450 [141] 60370:[137] 60480
  150. 60460 [141] 60410:[137] 60480
  151. 60470 [141] 60420
  152. 60480 [142]
  153.